/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ik.Reposteria.SMP.Encapsulados;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Malkavian
 */
@Embeddable
public class TelefonosagendaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "Agenda_id")
    private int agendaid;
    @Basic(optional = false)
    @Column(name = "id")
    private String id;

    public TelefonosagendaPK() {
    }

    public TelefonosagendaPK(int agendaid, String id) {
        this.agendaid = agendaid;
        this.id = id;
    }

    public int getAgendaid() {
        return agendaid;
    }

    public void setAgendaid(int agendaid) {
        this.agendaid = agendaid;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) agendaid;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TelefonosagendaPK)) {
            return false;
        }
        TelefonosagendaPK other = (TelefonosagendaPK) object;
        if (this.agendaid != other.agendaid) {
            return false;
        }
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.ik.Reposteria.SMP.Encapsulados.TelefonosagendaPK[ agendaid=" + agendaid + ", id=" + id + " ]";
    }
    
}
